<?php
namespace App\Base\Repositories;
use App\Base\Contracts\AreaInterface;
use App\Base\Models\AreaModel;

/**
 * Created by 荣耀电竞.
 * User: 林子彦 <278805354@qq.com>
 * Date: 2018/5/17 0017
 * Time: 17:22
 */
class DbAreaRepository implements  AreaInterface{
    /**
     * 获取地址信息
     * @return AreaModel
     */
    public function getAreaModel(){
        return app()->make(AreaModel::class);
    }

    /**
     * 地址列表
     * @param $where
     * @return \Illuminate\Database\Eloquent\Builder[]|\Illuminate\Database\Eloquent\Collection
     */
    public function getAreaList($where){
         return $this->getAreaModel()->newQuery()->where($where)->get();
    }

}